//    Openbravo POS is a point of sales application designed for touch screens.
//    Copyright (C) 2007-2009 Openbravo, S.L.
//    http://www.openbravo.com/product/pos
//
//    This file is part of Openbravo POS.
//
//    Openbravo POS is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    Openbravo POS is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with Openbravo POS.  If not, see <http://www.gnu.org/licenses/>.
package com.openbravo.pos.sales.keyboard;

import cn.ekuma.data.dao.ListKeyed;
import cn.ekuma.epos.bean.util.sale.TicketHelper;
import cn.ekuma.epos.businesslogic.RoleUtil;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.InputEvent;

import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;

import java.awt.*;

import com.openbravo.data.gui.ComboBoxValModel;
import com.openbravo.data.gui.JMessageDialog;
import com.openbravo.data.gui.MessageInf;
import com.openbravo.pos.base.AppConfig;
import com.openbravo.pos.base.AppLocal;
import com.openbravo.pos.base.AppUserView;
import com.openbravo.pos.base.AppView;
import com.openbravo.pos.base.BeanFactoryException;
import com.openbravo.pos.base.I_AppView;
import com.openbravo.data.basic.BasicException;
import com.openbravo.pos.panels.JPanelButtons;
import com.openbravo.pos.payment.JPaymentKeyboardSelectRefund;
import com.openbravo.pos.printer.DefaultTicketPrintManager;
import com.openbravo.pos.printer.RealTicketPrintManager;
import com.openbravo.pos.sales.AbstractJPanelTicket;
import com.openbravo.pos.sales.I_TicketLinePrintListener;
import com.openbravo.pos.sales.JCatalogKeyBoardDialog;
import com.openbravo.pos.sales.JTicketLines;
import com.openbravo.pos.sales.JTicketStatePanel;
import com.openbravo.pos.sales.TaxesLogic;
import com.openbravo.pos.scripting.ScriptException;
import com.openbravo.bean.AppUser;
import com.openbravo.bean.Product;
import com.openbravo.bean.Tax;
import com.openbravo.bean.TaxCategory;
import com.openbravo.bean.sales.QuickProduct;
import com.openbravo.bean.sales.Ticket;
import com.openbravo.bean.sales.TicketLine;

import java.awt.event.KeyEvent;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map.Entry;

/**
 * 
 * @author adrianromero
 */
@SuppressWarnings("serial")
public abstract class JPanelTicket extends AbstractJPanelTicket{
	
	private CardLayout helpLayout;
	private JPanel helpPanel;
	JCatalogKeyBoardDialog catalogKeyBoardDialog;
	Timer trayTimer;
	static SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
	protected JTicketStatePanel state;
	private JPopupMenu mainMenu;

	
	public JPanelTicket() {
		initComponents();
	}
	
	 private class QuickProductEntryAction extends AbstractAction {
		    int type;
	        public QuickProductEntryAction(int type,String keytext) {
	            
	            putValue(Action.NAME, AppLocal.getIntString(keytext));
	            putValue(AppUserView.ACTION_TASKNAME, keytext);
	            this.type=type;

	        }
	        public void actionPerformed(ActionEvent evt) {
	        	if(type!=-1)
	        	try {
					dlSales.saveTicketToQuickProduct(getActiveTicket(), type);
					new MessageInf(MessageInf.SGN_SUCCESS,
							AppLocal.getIntString("message.sucess")).show(JPanelTicket.this);
				} catch (BasicException e) {
					new MessageInf(MessageInf.SGN_WARNING,
							AppLocal.getIntString("message.cannotQuickProduct"), e).show(JPanelTicket.this);
				}
				mainMenu.setVisible(false);
	        }
	    }
	
	 @Override
	public void init(I_AppView app) throws BeanFactoryException {
		super.init(app);
		
		// borramos el boton de bascula si no hay bascula conectada
		if (!m_App.getDeviceScale().existsScale()) {
			m_jbtnScale.setVisible(false);
		}
	
		m_ticketsbag = getJTicketsBag();
		m_jPanelBag
				.add(m_ticketsbag.getBagComponent(), BorderLayout.LINE_START);
		add(m_ticketsbag.getNullComponent(), "null");
	
		m_ticketlines = new JTicketLines(
				dlSystem.getResourceAsXML("Ticket.Line"));
		m_jPanelCentral.add(m_ticketlines, java.awt.BorderLayout.CENTER);
	

		// Los botones configurables...
		m_jbtnconfig = new JPanelButtons("Ticket.Buttons", this);
		m_jButtonsExt.add(m_jbtnconfig);
	
		// El panel de los productos o de las lineas...
		catcontainer.add(getSouthComponent(), BorderLayout.CENTER);
	
		taxcategoriesmodel = new ComboBoxValModel();
		// ponemos a cero el estado
		stateToZero();
	
		m_ticketlines.addListSelectionListener(new ListSelectionListener() {
			@Override
			public void valueChanged(ListSelectionEvent e) {
				refreshTicketLineSelectedState();
			}
		});
	
		String printType = app.getProperties()
				.getProperty(AppConfig.PRINT_TYPE);
		if (printType != null) {
			try {
				if (printType.equalsIgnoreCase(AppConfig.PRINT_TYPE_REAl)) {
					printManager = new RealTicketPrintManager(m_TTP, this);
					listenerList.add(I_TicketLinePrintListener.class,
							printManager);
				} else
					printManager = new DefaultTicketPrintManager(m_TTP, this);
				m_ticketsbag.addTicketListener(printManager);
			} catch (ScriptException e) {
				MessageInf msg = new MessageInf(MessageInf.SGN_WARNING,
						AppLocal.getIntString("message.cannotprintticket"), e);
				msg.show(JPanelTicket.this);
			}
		}
		
		quickSellAble=app.getProperties().getProperty(AppConfig.APP_QUICKSELLABLE)==null?false:app.getProperties().getProperty(AppConfig.APP_QUICKSELLABLE).equalsIgnoreCase("true");
	
		paymentdialogreceipt =m_ticketsbag.getPaymentdialogreceipt();
		paymentdialogreceipt.init(m_App, dlSystem, dlSales, mode.getManager().getPluginManager(), security);
		paymentdialogrefund =m_ticketsbag.getPaymentdialogrefund(); JPaymentKeyboardSelectRefund.getDialog(this);
		paymentdialogrefund.init(m_App, dlSystem, dlSales,  mode.getManager().getPluginManager(), security);
		
		// inicializamos
		m_oTicket = null;
		m_oTicketExt = null;
		priceGroup=m_App.getProperties().getProperty(AppConfig.SALE_PRODUCT_GROUPNAME);
		
		String isCheckProductLocationStr=m_App.getProperties().getProperty(AppConfig.CHECK_PRODUCT_LOCATION);
		isCheckProductLocation=isCheckProductLocationStr==null?false:"true".equalsIgnoreCase(isCheckProductLocationStr);
	
		KeyStroke stroke = KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0);
		m_jKeyFactory.registerKeyboardAction(new M_inputDeleteAction(), stroke,JComponent.WHEN_FOCUSED);

		
		trayTimer = new javax.swing.Timer(1000, new ActionListener(){
			@Override
			public void actionPerformed(ActionEvent e) {
	
				lblTime.setText(sdf.format(new Date()));
			}
		});
		trayTimer.setRepeats(true);
		mainMenu=new javax.swing.JPopupMenu(AppLocal.getIntString("mainMenu.name"));
		mainMenu.add(new QuickProductEntryAction(QuickProduct.TYPE_MovementFrom,AppLocal.getIntString("QuickProduct.TYPE_MovementFrom")));
		mainMenu.add(new QuickProductEntryAction(QuickProduct.TYPE_MovementTo,AppLocal.getIntString("QuickProduct.TYPE_MovementTo")));
		mainMenu.add(new QuickProductEntryAction(QuickProduct.TYPE_VendorIn,AppLocal.getIntString("QuickProduct.TYPE_VendorIn")));
		mainMenu.add(new QuickProductEntryAction(QuickProduct.TYPE_VendorOut,AppLocal.getIntString("QuickProduct.TYPE_VendorOut")));
		mainMenu.add(new QuickProductEntryAction(QuickProduct.TYPE_OutOfStock,AppLocal.getIntString("QuickProduct.TYPE_OutOfStock")));
		mainMenu.add(new QuickProductEntryAction(QuickProduct.TYPE_BeDamaged,AppLocal.getIntString("QuickProduct.TYPE_BeDamaged")));
		mainMenu.add(new QuickProductEntryAction(QuickProduct.TYPE_BeOverdue,AppLocal.getIntString("QuickProduct.TYPE_BeOverdue")));
		mainMenu.add(new QuickProductEntryAction(QuickProduct.TYPE_Overdue,AppLocal.getIntString("QuickProduct.TYPE_TYPE_Overdue")));
		mainMenu.add(new QuickProductEntryAction(QuickProduct.TYPE_Unsalable,AppLocal.getIntString("QuickProduct.TYPE_Unsalable")));
		mainMenu.add(new QuickProductEntryAction(-1,AppLocal.getIntString("Button.Cancel")));
	}

	public void activate() throws BasicException {
		m_App.checkUserCashIndex();

		// impuestos incluidos seleccionado ?
		m_jaddtax.setSelected("true".equals(m_jbtnconfig
				.getProperty("taxesincluded")));

		// Inicializamos el combo de los impuestos.
		java.util.List<Tax> taxlist = dlSales.list(Tax.class);
		taxcollection = new ListKeyed<Tax>(taxlist);
		java.util.List<TaxCategory> taxcategorieslist = dlSales
				.list(TaxCategory.class);
		// taxcategoriescollection = new
		// ListKeyed<TaxCategory>(taxcategorieslist);

		taxcategoriesmodel = new ComboBoxValModel(taxcategorieslist);
		m_jTax.setModel(taxcategoriesmodel);

		String taxesid = m_jbtnconfig.getProperty("taxcategoryid");
		if (taxesid == null) {
			if (m_jTax.getItemCount() > 0) {
				m_jTax.setSelectedIndex(0);
			}
		} else {
			taxcategoriesmodel.setSelectedKey(taxesid);
		}
		taxeslogic = new TaxesLogic(taxlist);

		// Show taxes options
		if (security.hasPermissionByName("sales.ChangeTaxOptions")) {
			m_jTax.setVisible(true);
			m_jaddtax.setVisible(true);
		} else {
			m_jTax.setVisible(false);
			m_jaddtax.setVisible(false);
		}

		// Authorization for buttons
		btnSplit.setEnabled(security.hasPermissionByName("sales.Total"));
		m_jDelete.setEnabled(security.hasPermissionByName("sales.EditLines"));
		m_jNumberKeys.setMinusEnabled(security.hasPermissionByName( "sales.EditLines"));
		m_jNumberKeys.setEqualsEnabled(security.hasPermissionByName("sales.Total"));
		m_jbtnconfig.setPermissions(security);

		m_ticketsbag.activate();
		
		trayTimer.start();
		
	}
	
	 protected void refreshTicket() {
		
		CardLayout cl = (CardLayout) (getLayout());
	
		if (m_oTicket == null) {
			m_jTicketId.setText(null);
			m_ticketlines.clearTicketLines();
	
			m_jSubtotalEuros.setText(null);
			m_jTaxesEuros.setText(null);
			m_jTotalEuros.setText(null);
	
			stateToZero();
	
			// Muestro el panel de nulos.
			cl.show(this, "null");
			resetSouthComponent();
	
		} else {
			if (m_oTicket.getTicketType() == Ticket.RECEIPT_REFUND) {
				// Make disable Search and Edit Buttons
				m_jEditLine.setVisible(false);
				m_jList.setVisible(false);
			}
	
			// Refresh ticket taxes
			for (TicketLine line : m_oTicket.getLines()) {
				line.setTaxInfo(taxeslogic.getTaxInfo(
						line.getProductTaxCategoryID(), m_oTicket.getCustomer()));
			}
	
			// The ticket name
			m_jTicketId.setText(TicketHelper.getName(m_oTicket, m_oTicketExt));
			// Limpiamos todas las filas y anadimos las del ticket actual
			m_ticketlines.clearTicketLines();
	
			for (int i = 0; i < m_oTicket.getLinesCount(); i++) {
				m_ticketlines.addTicketLine(m_oTicket.getLine(i));
			}
			printPartialTotals();
			stateToZero();
	
			// Muestro el panel de tickets.
			cl.show(this, "ticket");
			resetSouthComponent();
	
			// activo el tecleador...
			m_jKeyFactory.setText(null);
			java.awt.EventQueue.invokeLater(new Runnable() {
	
				public void run() {
					m_jKeyFactory.requestFocus();
				}
			});
		}
	}

	public boolean deactivate() {
		trayTimer.stop();
		return super.deactivate();
	}

	private ActionMap getKeyBoardActions() {
		ActionMap actionMap = new ActionMap();
		// Ticket managed
		actionMap.put("Up", new M_jUpAction());
		actionMap.put("Down", new M_jDownAction());
		actionMap.put("Delete", new M_jDeleteAction());
		actionMap.put("EditAttributes", new M_jEditAttributesAction());
		actionMap.put("EditLine", new M_jEditLineAction());
		actionMap.put("Enter", new M_jEnterAction());
		actionMap.put("Change Coustomer", new M_jChangeCoustomerAction());
		actionMap.put("Print", new M_jPrintAction());
		actionMap.put("Open Drawer", new M_jOpenDrawerAction());
		actionMap.put("FindProc", new M_jListAction());

		actionMap.put("SplitTicket", new M_jSplitTicketAction());

		actionMap.put("InsServings", new M_jInsServingsAction());
		actionMap.put("ChangeHelpPanel", new M_jChangeHelpPanelAction());
		actionMap.put("changeTicketRate", new M_jChangeTicketRateAction());
		actionMap.put("EditLineAttrib", new M_jEditLineAttribAction());
		actionMap.put("changeTicketType", new M_jChangeTicketTypeAction());
		actionMap.put("ShowQuickSell", new M_jQuickSellAction());
		actionMap.put("AddCustomer", new AddCustomerAction());
		actionMap.put("Product Detail",new ShowProductDetailAction());
		actionMap.put("QuickProduct",new QuickProductAction());
		actionMap.put("PhysicalBondTicket",new PhysicalBondTicketAction());
		return actionMap;
	}

	private InputMap getKeyBoardInputMap() {
		InputMap inputMap = new InputMap();
		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "Up");
		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "Down");
		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), "EditLine");
		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0),
				"EditAttributes");
		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), "Delete");
		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0),
				"Change Coustomer");
		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), "SplitTicket");
		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F4, 0),
				"changeTicketType");

		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F9, 0), "FindProc");
		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F10, 0),
				"ShowQuickSell");
		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F11, 0), "Print");
		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F12, 0), "Open Drawer");

		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0),
				"InsServings");
		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0),
				"ChangeHelpPanel");
		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_END, 0),
				"changeTicketRate");
		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_HOME, 0),
				"EditLineAttrib");
		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0), "AddCustomer");
		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F, InputEvent.ALT_DOWN_MASK), "Product Detail");
		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_I, InputEvent.ALT_DOWN_MASK), "QuickProduct");
		inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, InputEvent.ALT_DOWN_MASK), "PhysicalBondTicket");
		return inputMap;
	}

	private Component getKeyHelpPanel() {
		helpPanel = new JPanel();
		helpLayout = new CardLayout();
		helpPanel.setLayout(helpLayout);
		JPanel penel = new JPanel();
		penel.setLayout(new java.awt.BorderLayout());
		JLabel keyHelpLabel = new JLabel();
		keyHelpLabel.setText(AppLocal.getIntString("label.keyHelp"));
		keyHelpLabel.setPreferredSize(new java.awt.Dimension(150, 600));
		penel.add(keyHelpLabel, java.awt.BorderLayout.CENTER);
		helpPanel.add("help", penel);

		for (int i = 1; i <= 5; i++) {
			String currentPage = "page" + i;
			String sKey = "label.keyHelp." + currentPage;
			String pageText = AppLocal.getIntString(sKey);
			if (!pageText.equalsIgnoreCase("** " + sKey + " **")) {
				penel = new JPanel();
				penel.setLayout(new java.awt.BorderLayout());
				keyHelpLabel = new JLabel();
				keyHelpLabel.setText(pageText);
				keyHelpLabel.setPreferredSize(new java.awt.Dimension(150, 600));
				penel.add(keyHelpLabel, java.awt.BorderLayout.CENTER);
				helpPanel.add(currentPage, penel);
			}
		}
		state = new JTicketStatePanel();
		helpPanel.add("ticketState", state);
		helpLayout.show(helpPanel, "ticketState");
		return helpPanel;
	}

	protected void stateToZero() {
		m_jPor.setText("");
		m_jPrice.setText("");
		m_sBarcode = new StringBuffer();

		m_iNumberStatus = NUMBER_INPUTZERO;
		m_iNumberStatusInput = NUMBERZERO;
		m_iNumberStatusPor = NUMBERZERO;
	}

	
	protected void printPartialTotals() {
		if (state.isVisible()) {
			state.refreshTicket(m_oTicket);
		}
		if (m_oTicket.getLinesCount() == 0) {
			m_jSubtotalEuros.setText(null);
			m_jTaxesEuros.setText(null);
			m_jTotalEuros.setText(null);
			if(cashPaid!=null){
			   m_jLblTotalEuros1.setText(AppLocal.getIntString("Label.ChangeCash")); // NOI18N
			   m_jTotalEuros.setText(cashChanged);
			   m_jLblTotalEuros2.setText(AppLocal.getIntString("Label.InputCash"));
			   m_jTaxesEuros.setText(cashPaid);
			   // m_jTaxesEuros.setVisible(false);
			   //m_jLblTotalEuros2.setVisible(false);
			}
		} else {
			m_jSubtotalEuros.setText(TicketHelper.printSubTotal(m_oTicket));
			m_jLblTotalEuros1.setText(AppLocal.getIntString("label.totalcash")); // NOI18N
			m_jTotalEuros.setText(TicketHelper.printTotal(m_oTicket));
			m_jLblTotalEuros2.setText(AppLocal.getIntString("label.articlescount"));
			m_jTaxesEuros.setText(TicketHelper.printArticlesCount(m_oTicket));
			//m_jTaxesEuros.setVisible(true);
			//m_jLblTotalEuros2.setVisible(true);
		}
	}
	
	protected void refreshTicketLineSelectedState() {
		int i = m_ticketlines.getSelectedIndex();
		if (i >= 0) {
			TicketLine selectedline = m_oTicket.getLine(i);
			if (selectedline != null) {
				state.refreshTicketLine(selectedline);
			}
		}
	}
	
	/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always
	 * regenerated by the FormEditor.
	 */
	// <editor-fold defaultstate="collapsed"
	// desc="Generated Code">//GEN-BEGIN:initComponents
	protected void initComponents() {
		java.awt.GridBagConstraints gridBagConstraints;

		m_jPanContainer = new javax.swing.JPanel();
		m_jOptions = new javax.swing.JPanel();
		m_jButtons = new javax.swing.JPanel();
		m_jTicketId = new javax.swing.JLabel();
		btnCustomer = new javax.swing.JButton();
		btnSplit = new javax.swing.JButton();
		m_jPanelScripts = new javax.swing.JPanel();
		m_jButtonsExt = new javax.swing.JPanel();
		jPanel1 = new javax.swing.JPanel();
		m_jbtnScale = new javax.swing.JButton();
		m_jPanelBag = new javax.swing.JPanel();
		m_jPanTicket = new javax.swing.JPanel();
		jPanel5 = new javax.swing.JPanel();
		jPanel2 = new javax.swing.JPanel();
		m_jUp = new javax.swing.JButton();
		m_jDown = new javax.swing.JButton();
		m_jDelete = new javax.swing.JButton();
		m_jList = new javax.swing.JButton();
		m_jEditLine = new javax.swing.JButton();
		jEditAttributes = new javax.swing.JButton();
		m_jPanelCentral = new javax.swing.JPanel();
		jPanel4 = new javax.swing.JPanel();
		m_jPanTotals = new javax.swing.JPanel();
		m_jTotalEuros = new javax.swing.JLabel();
		m_jLblTotalEuros1 = new javax.swing.JLabel();
		m_jSubtotalEuros = new javax.swing.JLabel();
		m_jTaxesEuros = new javax.swing.JLabel();
		lblTime = new javax.swing.JLabel();
		m_jLblTotalEuros2 = new javax.swing.JLabel();
		m_jLblTotalEuros3 = new javax.swing.JLabel();
		m_jContEntries = new javax.swing.JPanel();
		m_jPanEntries = new javax.swing.JPanel();
		m_jNumberKeys = new com.openbravo.beans.JNumberKeys();
		jPanel9 = new javax.swing.JPanel();
		m_jPrice = new javax.swing.JLabel();
		m_jPor = new javax.swing.JLabel();
		m_jEnter = new javax.swing.JButton();
		m_jTax = new javax.swing.JComboBox();
		m_jaddtax = new javax.swing.JToggleButton();
		m_jKeyFactory = new javax.swing.JTextField();
		catcontainer = new javax.swing.JPanel();

		setBackground(new java.awt.Color(255, 204, 153));
		setLayout(new java.awt.CardLayout());

		m_jPanContainer.setLayout(new java.awt.BorderLayout());

		m_jOptions.setLayout(new java.awt.BorderLayout());

		m_jTicketId.setBackground(java.awt.Color.white);
		m_jTicketId.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		m_jTicketId.setBorder(javax.swing.BorderFactory.createCompoundBorder(
				javax.swing.BorderFactory
						.createLineBorder(javax.swing.UIManager.getDefaults()
								.getColor("Button.darkShadow")),
				javax.swing.BorderFactory.createEmptyBorder(1, 4, 1, 4)));
		m_jTicketId.setOpaque(true);
		m_jTicketId.setPreferredSize(new java.awt.Dimension(160, 25));
		m_jTicketId.setRequestFocusEnabled(false);
		m_jButtons.add(m_jTicketId);

		btnCustomer.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"/com/openbravo/images/kuser.png"))); // NOI18N
		btnCustomer.setFocusPainted(false);
		btnCustomer.setFocusable(false);
		btnCustomer.setMargin(new java.awt.Insets(8, 14, 8, 14));
		btnCustomer.setRequestFocusEnabled(false);
		btnCustomer.addActionListener(new java.awt.event.ActionListener() {

			@Override
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				btnCustomerActionPerformed(evt);
			}
		});
		m_jButtons.add(btnCustomer);

		btnSplit.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"/com/openbravo/images/editcut.png"))); // NOI18N
		btnSplit.setFocusPainted(false);
		btnSplit.setFocusable(false);
		btnSplit.setMargin(new java.awt.Insets(8, 14, 8, 14));
		btnSplit.setRequestFocusEnabled(false);
		btnSplit.addActionListener(new java.awt.event.ActionListener() {

			public void actionPerformed(java.awt.event.ActionEvent evt) {
				btnSplitActionPerformed(evt);
			}
		});
		m_jButtons.add(btnSplit);

		m_jOptions.add(m_jButtons, java.awt.BorderLayout.LINE_START);

		m_jPanelScripts.setLayout(new java.awt.BorderLayout());

		m_jButtonsExt.setLayout(new javax.swing.BoxLayout(m_jButtonsExt,
				javax.swing.BoxLayout.LINE_AXIS));

		m_jbtnScale.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"/com/openbravo/images/ark216.png"))); // NOI18N
		m_jbtnScale.setText(AppLocal.getIntString("button.scale")); // NOI18N
		m_jbtnScale.setFocusPainted(false);
		m_jbtnScale.setFocusable(false);
		m_jbtnScale.setMargin(new java.awt.Insets(8, 14, 8, 14));
		m_jbtnScale.setRequestFocusEnabled(false);
		m_jbtnScale.addActionListener(new java.awt.event.ActionListener() {

			public void actionPerformed(java.awt.event.ActionEvent evt) {
				m_jbtnScaleActionPerformed(evt);
			}
		});
		jPanel1.add(m_jbtnScale);

		m_jButtonsExt.add(jPanel1);

		m_jPanelScripts.add(m_jButtonsExt, java.awt.BorderLayout.LINE_END);

		m_jOptions.add(m_jPanelScripts, java.awt.BorderLayout.LINE_END);

		m_jPanelBag.setLayout(new java.awt.BorderLayout());
		m_jOptions.add(m_jPanelBag, java.awt.BorderLayout.CENTER);

		m_jPanContainer.add(m_jOptions, java.awt.BorderLayout.NORTH);

		m_jPanTicket.setBorder(javax.swing.BorderFactory.createEmptyBorder(5,
				5, 5, 5));
		m_jPanTicket.setLayout(new java.awt.BorderLayout());

		jPanel5.setLayout(new java.awt.BorderLayout());

		jPanel2.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 0,
				5));
		jPanel2.setLayout(new java.awt.GridLayout(0, 1, 5, 5));

		m_jUp.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"/com/openbravo/images/1uparrow22.png"))); // NOI18N
		m_jUp.setFocusPainted(false);
		m_jUp.setFocusable(false);
		m_jUp.setMargin(new java.awt.Insets(8, 14, 8, 14));
		m_jUp.setRequestFocusEnabled(false);
		m_jUp.addActionListener(new java.awt.event.ActionListener() {

			public void actionPerformed(java.awt.event.ActionEvent evt) {
				m_jUpActionPerformed(evt);
			}
		});
		jPanel2.add(m_jUp);

		m_jDown.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"/com/openbravo/images/1downarrow22.png"))); // NOI18N
		m_jDown.setFocusPainted(false);
		m_jDown.setFocusable(false);
		m_jDown.setMargin(new java.awt.Insets(8, 14, 8, 14));
		m_jDown.setRequestFocusEnabled(false);
		m_jDown.addActionListener(new java.awt.event.ActionListener() {

			public void actionPerformed(java.awt.event.ActionEvent evt) {
				m_jDownActionPerformed(evt);
			}
		});
		jPanel2.add(m_jDown);

		m_jDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"/com/openbravo/images/locationbar_erase.png"))); // NOI18N
		m_jDelete.setFocusPainted(false);
		m_jDelete.setFocusable(false);
		m_jDelete.setMargin(new java.awt.Insets(8, 14, 8, 14));
		m_jDelete.setRequestFocusEnabled(false);
		m_jDelete.addActionListener(new java.awt.event.ActionListener() {

			public void actionPerformed(java.awt.event.ActionEvent evt) {
				m_jDeleteActionPerformed(evt);
			}
		});
		jPanel2.add(m_jDelete);

		m_jList.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"/com/openbravo/images/search22.png"))); // NOI18N
		m_jList.setFocusPainted(false);
		m_jList.setFocusable(false);
		m_jList.setMargin(new java.awt.Insets(8, 14, 8, 14));
		m_jList.setRequestFocusEnabled(false);
		m_jList.addActionListener(new java.awt.event.ActionListener() {

			public void actionPerformed(java.awt.event.ActionEvent evt) {
				m_jListActionPerformed(evt);
			}
		});
		jPanel2.add(m_jList);

		m_jEditLine.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"/com/openbravo/images/color_line.png"))); // NOI18N
		m_jEditLine.setFocusPainted(false);
		m_jEditLine.setFocusable(false);
		m_jEditLine.setMargin(new java.awt.Insets(8, 14, 8, 14));
		m_jEditLine.setRequestFocusEnabled(false);
		m_jEditLine.addActionListener(new java.awt.event.ActionListener() {

			public void actionPerformed(java.awt.event.ActionEvent evt) {
				m_jEditLineActionPerformed(evt);
			}
		});
		jPanel2.add(m_jEditLine);

		jEditAttributes.setIcon(new javax.swing.ImageIcon(getClass()
				.getResource("/com/openbravo/images/colorize.png"))); // NOI18N
		jEditAttributes.setFocusPainted(false);
		jEditAttributes.setFocusable(false);
		jEditAttributes.setMargin(new java.awt.Insets(8, 14, 8, 14));
		jEditAttributes.setRequestFocusEnabled(false);
		jEditAttributes.addActionListener(new java.awt.event.ActionListener() {

			public void actionPerformed(java.awt.event.ActionEvent evt) {
				jEditAttributesActionPerformed(evt);
			}
		});
		jPanel2.add(jEditAttributes);

		// jPanel5.add(jPanel2, java.awt.BorderLayout.NORTH);

		m_jPanTicket.add(jPanel5, java.awt.BorderLayout.LINE_END);

		m_jPanelCentral.setLayout(new java.awt.BorderLayout());

		jPanel4.setLayout(new java.awt.BorderLayout());

		m_jPanTotals.setLayout(new java.awt.GridBagLayout());

		m_jTotalEuros.setBackground(java.awt.Color.white);
		m_jTotalEuros.setFont(new java.awt.Font("Dialog", 1, 35));
		m_jTotalEuros
				.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
		m_jTotalEuros.setBorder(javax.swing.BorderFactory.createCompoundBorder(
				javax.swing.BorderFactory
						.createLineBorder(javax.swing.UIManager.getDefaults()
								.getColor("Button.darkShadow")),
				javax.swing.BorderFactory.createEmptyBorder(1, 4, 1, 4)));
		m_jTotalEuros.setOpaque(true);
		m_jTotalEuros.setPreferredSize(new java.awt.Dimension(260, 50));
		m_jTotalEuros.setRequestFocusEnabled(false);
		gridBagConstraints = new java.awt.GridBagConstraints();
		gridBagConstraints.gridx = 3;
		gridBagConstraints.gridy = 0;
		gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
		gridBagConstraints.weightx = 3.0;
		gridBagConstraints.weighty = 1.0;
		gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
		m_jPanTotals.add(m_jTotalEuros, gridBagConstraints);

		m_jLblTotalEuros1.setText(AppLocal.getIntString("label.totalcash")); // NOI18N
		m_jLblTotalEuros1.setHorizontalAlignment(SwingConstants.CENTER);
		m_jLblTotalEuros1.setFont(new java.awt.Font("Dialog", 1, 20));
		gridBagConstraints = new java.awt.GridBagConstraints();
		gridBagConstraints.gridx = 2;
		gridBagConstraints.gridy = 0;
		gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
		gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
		m_jPanTotals.add(m_jLblTotalEuros1, gridBagConstraints);

		m_jTaxesEuros.setBackground(java.awt.Color.white);
		m_jTaxesEuros
				.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
		m_jTaxesEuros.setFont(new java.awt.Font("Dialog", 1, 35));
		m_jTaxesEuros.setBorder(javax.swing.BorderFactory.createCompoundBorder(
				javax.swing.BorderFactory
						.createLineBorder(javax.swing.UIManager.getDefaults()
								.getColor("Button.darkShadow")),
				javax.swing.BorderFactory.createEmptyBorder(1, 4, 1, 4)));
		m_jTaxesEuros.setOpaque(true);
		m_jTaxesEuros.setPreferredSize(new java.awt.Dimension(180, 50));
		m_jTaxesEuros.setRequestFocusEnabled(false);
		gridBagConstraints = new java.awt.GridBagConstraints();
		gridBagConstraints.gridx = 1;
		gridBagConstraints.gridy = 0;
		gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
		gridBagConstraints.weightx = 1.0;
		gridBagConstraints.weighty = 1.0;
		gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 5);
		m_jPanTotals.add(m_jTaxesEuros, gridBagConstraints);

		m_jLblTotalEuros2.setText(AppLocal.getIntString("label.articlescount")); // NOI18N
		m_jLblTotalEuros2
				.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
		m_jLblTotalEuros2.setFont(new java.awt.Font("Dialog", 1, 20));
		gridBagConstraints = new java.awt.GridBagConstraints();
		gridBagConstraints.gridx = 0;
		gridBagConstraints.gridy = 0;
		gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
		gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
		m_jPanTotals.add(m_jLblTotalEuros2, gridBagConstraints);
		jPanel4.add(m_jPanTotals, java.awt.BorderLayout.LINE_END);

		m_jPanelCentral.add(jPanel4, java.awt.BorderLayout.SOUTH);

		m_jPanTicket.add(m_jPanelCentral, java.awt.BorderLayout.CENTER);

		m_jPanContainer.add(m_jPanTicket, java.awt.BorderLayout.CENTER);

		m_jContEntries.setLayout(new java.awt.BorderLayout());

		m_jPanEntries.setLayout(new java.awt.BorderLayout());

		m_jNumberKeys
				.addJNumberEventListener(new com.openbravo.beans.JNumberEventListener() {

					public void keyPerformed(
							com.openbravo.beans.JNumberEvent evt) {
						m_jNumberKeysKeyPerformed(evt);
					}
				});

		jPanel9.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5,
				5));
		jPanel9.setLayout(new java.awt.GridBagLayout());

		m_jPrice.setBackground(java.awt.Color.white);
		m_jPrice.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
		m_jPrice.setBorder(javax.swing.BorderFactory.createCompoundBorder(
				javax.swing.BorderFactory
						.createLineBorder(javax.swing.UIManager.getDefaults()
								.getColor("Button.darkShadow")),
				javax.swing.BorderFactory.createEmptyBorder(1, 4, 1, 4)));
		m_jPrice.setOpaque(true);
		m_jPrice.setPreferredSize(new java.awt.Dimension(100, 30));
		m_jPrice.setFont(new java.awt.Font("Dialog", 1, 21));
		m_jPrice.setRequestFocusEnabled(false);
		gridBagConstraints = new java.awt.GridBagConstraints();
		gridBagConstraints.gridx = 0;
		gridBagConstraints.gridy = 0;
		gridBagConstraints.gridwidth = 2;
		gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
		gridBagConstraints.weightx = 1.0;
		gridBagConstraints.weighty = 1.0;
		jPanel9.add(m_jPrice, gridBagConstraints);

		m_jPor.setBackground(java.awt.Color.white);
		m_jPor.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
		m_jPor.setBorder(javax.swing.BorderFactory.createCompoundBorder(
				javax.swing.BorderFactory
						.createLineBorder(javax.swing.UIManager.getDefaults()
								.getColor("Button.darkShadow")),
				javax.swing.BorderFactory.createEmptyBorder(1, 4, 1, 4)));
		m_jPor.setOpaque(true);
		m_jPor.setPreferredSize(new java.awt.Dimension(22, 22));
		m_jPor.setRequestFocusEnabled(false);
		gridBagConstraints = new java.awt.GridBagConstraints();
		gridBagConstraints.gridx = 2;
		gridBagConstraints.gridy = 0;
		gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
		gridBagConstraints.weightx = 1.0;
		gridBagConstraints.weighty = 1.0;
		gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);

		m_jTax.setFocusable(false);
		m_jTax.setRequestFocusEnabled(false);
		gridBagConstraints = new java.awt.GridBagConstraints();
		gridBagConstraints.gridx = 0;
		gridBagConstraints.gridy = 1;
		gridBagConstraints.gridwidth = 2;
		gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
		gridBagConstraints.weightx = 1.0;
		gridBagConstraints.weighty = 1.0;
		gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
		jPanel9.add(m_jTax, gridBagConstraints);

		m_jaddtax.setText("+");
		m_jaddtax.setFocusPainted(false);
		m_jaddtax.setFocusable(false);
		m_jaddtax.setRequestFocusEnabled(false);
		gridBagConstraints = new java.awt.GridBagConstraints();
		gridBagConstraints.gridx = 2;
		gridBagConstraints.gridy = 1;
		gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
		gridBagConstraints.weightx = 1.0;
		gridBagConstraints.weighty = 1.0;
		gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
		jPanel9.add(m_jaddtax, gridBagConstraints);

		m_jPanEntries.add(jPanel9, java.awt.BorderLayout.SOUTH);

		m_jKeyFactory.setBackground(javax.swing.UIManager.getDefaults()
				.getColor("Panel.background"));
		m_jKeyFactory.setForeground(javax.swing.UIManager.getDefaults()
				.getColor("Panel.background"));
		m_jKeyFactory.setBorder(null);
		m_jKeyFactory.setCaretColor(javax.swing.UIManager.getDefaults()
				.getColor("Panel.background"));
		m_jKeyFactory.setPreferredSize(new java.awt.Dimension(1, 1));
		m_jKeyFactory.addKeyListener(new java.awt.event.KeyAdapter() {

			public void keyTyped(java.awt.event.KeyEvent evt) {
				m_jKeyFactoryKeyTyped(evt);
			}
		});
		m_jKeyFactory.setActionMap(getKeyBoardActions());
		m_jKeyFactory.setInputMap(JTextField.WHEN_FOCUSED,
				getKeyBoardInputMap());
		m_jPanEntries.add(m_jKeyFactory, java.awt.BorderLayout.CENTER);

		m_jContEntries.add(m_jPanEntries, java.awt.BorderLayout.NORTH);
		lblTime.setBounds(0, 0, 200, 60);
		lblTime.setFont(new Font("Times New Roman", Font.BOLD, 40));
		lblTime.setBackground(Color.WHITE);
		lblTime.setForeground(Color.BLUE);
		m_jContEntries.add(lblTime, java.awt.BorderLayout.SOUTH);

		m_jContEntries.add(getKeyHelpPanel(), BorderLayout.CENTER);

		m_jPanContainer.add(m_jContEntries, java.awt.BorderLayout.LINE_END);

		catcontainer.setBorder(javax.swing.BorderFactory.createEmptyBorder(5,
				5, 5, 5));
		catcontainer.setLayout(new java.awt.BorderLayout());
		m_jPanContainer.add(catcontainer, java.awt.BorderLayout.SOUTH);

		add(m_jPanContainer, "ticket");
	}// </editor-fold>//GEN-END:initComponents

	protected void quickSell() {
		if (catalogKeyBoardDialog == null) {
			try {
				catalogKeyBoardDialog = JCatalogKeyBoardDialog.newJDialog(this,
						dlSales, m_jbtnconfig, false);
			} catch (BasicException e) {
				JMessageDialog.showMessage(
						this,
						new MessageInf(MessageInf.SGN_WARNING, AppLocal
								.getIntString("message.notactive"), e));
				catalogKeyBoardDialog = null;
				return;
			}
		} else {
			catalogKeyBoardDialog.reset();
		}
		catalogKeyBoardDialog.setVisible(true);	
		for (Entry<Product,Double> e : catalogKeyBoardDialog.getShoppingCart().getLines().entrySet()) {
				incProduct(e.getValue(),e.getKey());
			}
	}
	
	
	
	class M_inputDeleteAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			String sName = m_jPrice.getText();
			if (sName != null && !sName.isEmpty()) {
				sName = (String) sName.subSequence(0, sName.length() - 1);
				m_jPrice.setText(sName);
			}
		}
	}

	class M_jInsServingsAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			addServings();
		}
	}

	class M_jChangeHelpPanelAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			helpLayout.next(helpPanel);
			printPartialTotals(); // pinto los totales parciales...
		}
	}

	class M_jDeleteAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			m_jDeleteActionPerformed(e);
		}
	}

	class M_jDownAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			m_jDownActionPerformed(e);
		}
	}

	class M_jEditLineAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			m_jEditLineActionPerformed(e);
		}
	}

	class M_jEditLineAttribAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			m_jEditLineAttrib();
		}
	}

	class M_jEnterAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			m_jEnterActionPerformed(e);
		}
	}

	class M_jListAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			m_jListActionPerformed(e);
		}
	}

	class M_jUpAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			m_jUpActionPerformed(e);
		}
	}

	class M_jEditAttributesAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			jEditAttributesActionPerformed(e);
		}
	}

	class M_jSplitTicketAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			btnSplitActionPerformed(e);
		}
	}

	class M_jOpenDrawerAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			if (RoleUtil.hasPermission(JPanelTicket.this, (AppUser) m_App
					.getAppUserView().getUser(), dlSystem,
					RoleUtil.Permission_OPENDRAWER))
				print("Printer.OpenDrawer");
		}
	}

	class M_jPrintAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			if (RoleUtil.hasPermission(JPanelTicket.this, (AppUser) m_App
					.getAppUserView().getUser(), dlSystem,
					RoleUtil.Permission_PRINT_TICKET))
				print("Printer.TicketPreview");
		}
	}

	class M_jChangeCoustomerAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			btnCustomerActionPerformed(e);
		}
	}

	class M_jChangeTicketRateAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			changeTicketRate();
		}
	}

	class M_jChangeTicketTypeAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			changeTicketType();
		}
	}

	class M_jQuickSellAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			quickSell();
		}
	}

	class AddCustomerAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			addNewCustomer();
		}
	}

	class ShowProductDetailAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			showProductDetail();
		}
	}
	
	class QuickProductAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			mainMenu.show(JPanelTicket.this,200,200);
		}
	}
	
	class PhysicalBondTicketAction extends AbstractAction {

		@Override
		public void actionPerformed(ActionEvent e) {
			physicalBondTicket();
		}
	}
	
	
	
	private javax.swing.JPanel jPanel1;
	private javax.swing.JPanel jPanel2;
	private javax.swing.JPanel jPanel4;
	private javax.swing.JPanel jPanel5;
	private javax.swing.JPanel jPanel9;
	private javax.swing.JPanel m_jButtons;
	private javax.swing.JPanel m_jContEntries;
	//private javax.swing.JButton m_jDelete;
	private javax.swing.JButton m_jDown;
	//javax.swing.JButton m_jEditLine;
	private javax.swing.JButton m_jEnter;
	//private com.openbravo.beans.JNumberKeys m_jNumberKeys;
	private javax.swing.JPanel m_jOptions;
	private javax.swing.JPanel m_jPanContainer;
	private javax.swing.JPanel m_jPanEntries;
	private javax.swing.JPanel m_jPanTicket;
	private javax.swing.JPanel m_jPanTotals;
	//javax.swing.JPanel m_jPanelBag;
	//javax.swing.JPanel m_jPanelCentral;
	private javax.swing.JPanel m_jPanelScripts;
	//javax.swing.JLabel m_jTaxesEuros;
	//javax.swing.JLabel m_jTicketId;
	//javax.swing.JLabel m_jTotalEuros;
	private javax.swing.JButton m_jUp;
	//javax.swing.JToggleButton m_jaddtax;
	//javax.swing.JButton m_jbtnScale;
	javax.swing.JLabel lblTime;
	
	 protected javax.swing.JButton btnCustomer;
		protected javax.swing.JButton btnSplit;
		protected javax.swing.JPanel catcontainer;
		protected javax.swing.JPanel m_jButtonsExt;
		protected javax.swing.JButton m_jEditLine;
		protected javax.swing.JButton m_jDelete;
	    protected com.openbravo.beans.JNumberKeys m_jNumberKeys;
		
		protected javax.swing.JLabel m_jLblTotalEuros1;
		protected javax.swing.JLabel m_jLblTotalEuros2;
		protected javax.swing.JLabel m_jLblTotalEuros3;
		protected javax.swing.JButton m_jList;
		protected javax.swing.JPanel m_jPanelBag;
		protected javax.swing.JPanel m_jPanelCentral;
		

		protected javax.swing.JLabel m_jSubtotalEuros;
	    protected javax.swing.JComboBox m_jTax;
		protected javax.swing.JLabel m_jTaxesEuros;

		protected javax.swing.JLabel m_jTotalEuros;
		
		protected javax.swing.JButton m_jbtnScale;
	
	
}
